import callApi from '../utils/request';
import {
  API_INVOICE_ORDER_LIST,
  API_INVOICE_INFO_LIST,
  API_ADD_INVOICE_INFO,
  API_EDIT_INVOICE_INFO,
  API_DO_INVOICE,
  API_INVOICE_LIST,
  API_SEND_EMAIL,
  API_INVOICE_URL,
  API_INVOICE_STATUS,
  API_DEL_INVOICE_INFO,
  API_INVOICE_EMAIL_HIS,
} from '../constants/api';

export function queryEmail(params) {
  return callApi({
    api: API_INVOICE_EMAIL_HIS,
    params,
  });
}


export function queryInvoiceStatus(params) {
  return callApi({
    api: API_INVOICE_STATUS,
    params,
  });
}

export function delInfo(params) {
  return callApi({
    api: API_DEL_INVOICE_INFO,
    params,
  });
}

export function queryInvoiceUrl(params) {
  return callApi({
    api: API_INVOICE_URL,
    params,
  });
}


export function sendEmail(params) {
  return callApi({
    api: API_SEND_EMAIL,
    params,
  });
}


export function queryInvoiceList(params) {
  return callApi({
    api: API_INVOICE_LIST,
    params,
  });
}


export function doInvoice(params) {
  return callApi({
    api: API_DO_INVOICE,
    params,
  });
}


export function addInfo(params) {
  return callApi({
    api: API_ADD_INVOICE_INFO,
    params,
  });
}

export function editInfo(params) {
  return callApi({
    api: API_EDIT_INVOICE_INFO,
    params,
  });
}


export function queryInvoiceOrderList(params) {
  return callApi({
    api: API_INVOICE_ORDER_LIST,
    params,
  });
}

export function queryInfoList(params) {
  return callApi({
    api: API_INVOICE_INFO_LIST,
    params,
  });
}

